using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class WLHeightController : MonoBehaviour
{
    public float height_down = 0;
    public ConfigurableJoint left;
    public ConfigurableJoint right;
    private void FixedUpdate()
    {
        if (height_down < 0)
        {
            height_down = 0;
        }
        var limit_l = left.linearLimit;
        limit_l.limit = height_down;
        left.linearLimit = limit_l;
        var limit_r = right.linearLimit;
        limit_r.limit = height_down;
        right.linearLimit = limit_r;
    }
}
